package com.yipinhouse.employee.app.appImpl;

import cn.hutool.jwt.JWTUtil;
import com.yipinhouse.common.result.Result;
import com.yipinhouse.employee.client.AchievementQueryClient;
import com.yipinhouse.employee.service.AchievementService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.math.BigDecimal;

@RestController
@Slf4j
public class AchievementApiImpl implements AchievementQueryClient {

    @Resource
    private AchievementService achievementService;

    /**
     * 意向金链接
     *
     * @return
     */
    @Override
    public Result<String> sendIntention(Integer houseId, Integer brokerId, String houseType, BigDecimal amount) throws Exception {
        String path = achievementService.sendIntention(houseId,brokerId, houseType, amount);
        return Result.getInstance(String.class).setMsg("生成url成功").setCode(200).setData(path);
    }
}
